import wepy from 'wepy'

export default class currentlocation extends wepy.mixin {
  data = {
    longitude: 116.400146,
    latitude: '39.900584'
  }

  getcurrentlocation(){
    let self=this
    wx.getLocation({
      type: 'gcj02',
      success: function(res) {
        self.latitude = res.latitude
        self.longitude = res.longitude
        self.$apply()
      }
    })
  }
}
